<template>
  <router-view v-slot="{ Component }">
    <component :is="Component" />
  </router-view>
</template>
<script setup>
  import { onMounted } from 'vue'
  import { useThemeStore } from '@/store/theme'
  const themeStore = useThemeStore()

  onMounted(() => {
    const app = document.querySelector('#app')
    const theme = themeStore.getTheme()
    app.className = ''
    // if (theme) {
    app.classList.add(theme)
    // } else {
    //   app.classList.add('theme_default')
    // }
  })
</script>
